<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC>
<!-- saved from url=(0048)http://localhost:8080/mango/product/list/1.jhtml -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>聚优商城</title>
<link href="${pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/product.css" rel="stylesheet" type="text/css">

</head>
<body>

<!-- 静态导入菜单栏 -->
	<%@include file="/WEB-INF/jsp/menu.jsp" %>
<div class="container productList">
		<div class="span6">
			<div class="hotProductCategory">
				<s:iterator value="#session.cList" var="c">
						<dl>
							<dt>
								<a href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="#c.cid"/>&pageNumber=1"><s:property value="#c.cname"/></a>
							</dt>
								<s:iterator  var="cs" value="#c.categorySecond">
									<dd>
										<a href="${pageContext.request.contextPath }/product_findByCsid?csid=<s:property value="#cs.csid"/>&pageNumber=1"><s:property value="#cs.csname"/></a>
									</dd>
								</s:iterator>
							</dl>
				</s:iterator>
			</div>
		</div>
		<div class="span18 last">
			
			<form id="productForm" action="./image/蔬菜 - Powered By Mango Team.htm" method="get">
					
				<div id="result" class="result table clearfix">
						<ul>
						<s:iterator value="pb.data" var="p">
							<li>
								<a href="${pageContext.request.contextPath }/product_findById.action?pid=<s:property value="#p.pid"/>">
									<img src="/images/<s:property value="#p.image"/>" width="170" height="170"  style="display: inline-block;">
										<span style='color:green'>
											<s:property value="#p.pname"/>
										</span>
											 <!-- <s:property value="#p.image"/> -->
										<span class="price">
												商城价： ￥<s:property value="#p.shop_price"/>
										</span>
								</a>	
							</li>
						</s:iterator>
						</ul>
				</div>
	<div class="pagination">
		<span>第<s:property value = "pb.pageNumber"/>/<s:property value = "pb.page"/></span>
		<s:if test="cid != null">
			<s:if test="pb.pageNumber != 1">
				<a href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="cid"/>&pageNumber=1" class="firstPage">&nbsp;</a>
				<a href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="cid"/>&pageNumber=<s:property value="pb.pageNumber-1"/>" class="previousPage">&nbsp;</a>
			</s:if>
			
			<s:iterator  var="n" begin="1" end="pb.page">
				<s:if test="pb.pageNumber != #n">
					<a href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="cid"/>&pageNumber=<s:property value="#n"/>"><s:property value="#n"/></a>
				</s:if>
				<s:else>
					<span class="currentPage"><s:property value="#n"/></span>
				</s:else>
			</s:iterator>
			<s:if test="pb.pageNumber != pb.page">				
				<a class="nextPage" href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="cid"/>&pageNumber=<s:property value="pb.pageNumber+1"/>">&nbsp;</a>
				<a class="lastPage" href="${pageContext.request.contextPath}/product_findByCid?cid=<s:property value="cid"/>&pageNumber=<s:property value="pb.page"/>">&nbsp;</a>
			</s:if>
		</s:if>	
		
		<s:if test="csid != null">
			<s:if test="pb.pageNumber != 1">
				<a href="${pageContext.request.contextPath}/product_findByCsid?csid=<s:property value="csid"/>&pageNumber=1" class="firstPage">&nbsp;</a>
				<a href="${pageContext.request.contextPath}/product_findByCsid?csid=<s:property value="csid"/>&pageNumber=<s:property value="pb.pageNumber-1"/>" class="previousPage">&nbsp;</a>
			</s:if>
			
			<s:iterator  var="n" begin="1" end="pb.page">
				<s:if test="pb.pageNumber != #n">
					<a href="${pageContext.request.contextPath}/product_findByCsid?csid=<s:property value="csid"/>&pageNumber=<s:property value="#n"/>"><s:property value="#n"/></a>
				</s:if>
				<s:else>
					<span class="currentPage"><s:property value="#n"/></span>
				</s:else>
			</s:iterator>
			<s:if test="pb.pageNumber != pb.page">				
				<a class="nextPage" href="${pageContext.request.contextPath}/product_findByCsid?csid=<s:property value="csid"/>&pageNumber=<s:property value="pb.pageNumber+1"/>">&nbsp;</a>
				<a class="lastPage" href="${pageContext.request.contextPath}/product_findByCsid?csid=<s:property value="csid"/>&pageNumber=<s:property value="pb.page"/>">&nbsp;</a>
			</s:if>
		</s:if>
	</div>
			</form>
		</div>
	</div>
	

	
	
<div class="container footer">
	<div class="span24">
		<div class="footerAd">
					<img src="./image/footer.jpg" width="950" height="52" alt="我们的优势" title="我们的优势">
</div>	</div>
	<div class="span24">
		<ul class="bottomNav">
					<li>
						<a >关于我们</a>
						|
					</li>
					<li>
						<a>联系我们</a>
						|
					</li>
					<li>
						<a >诚聘英才</a>
						|
					</li>
					<li>
						<a >法律声明</a>
						|
					</li>
					<li>
						<a>友情链接</a>
						|
					</li>
					<li>
						<a target="_blank">支付方式</a>
						|
					</li>
					<li>
						<a  target="_blank">配送方式</a>
						|
					</li>
					<li>
						<a >官网</a>
						|
					</li>
					<li>
						<a >论坛</a>
						
					</li>
		</ul>
	</div>
	<div class="span24">
		<div class="copyright">Copyright©2005-2015 网上商城 版权所有</div>
	</div>
</div>
</body></html>